package com.jeeplus.modules.guide.service;

import com.jeeplus.common.utils.DateUtils;
import com.jeeplus.database.datasource.annotation.DS;
import com.jeeplus.modules.guide.entity.*;
import com.jeeplus.modules.guide.mapper.MobileOtherMapper;
import com.jeeplus.modules.guide.mapper.MobileQueueMapper;
import com.jeeplus.modules.guide.model.vo.AppointmentRecordOut;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;

/**
 * ClassName: MobileQueueService
 * Function:  对接service
 * Date:      2021/6/11 18:35
 *
 * @author azj
 * version    V1.0
 */
@DS("gxque")
@RequiredArgsConstructor
@Service
@Slf4j
public class MobileOtherService {
    private final MobileOtherMapper mobileOtherMapper;

    public void deleteQueue(){
        mobileOtherMapper.deleteQueue();

    }
    @Transactional(readOnly = false)
    public int intoOtherQueue(List<MobileOtherQueue> list){
        return mobileOtherMapper.intoOtherQueue(list);
    }
    @Transactional(readOnly = false)
    public int intoOtherQueueHistory(MobileOtherHQueue mh,String timeExpr){
        return mobileOtherMapper.intoOtherQueueHistory(mh,timeExpr);
    }
    public List<String> findIdList(String timeExpr){
        return mobileOtherMapper.findIdList(timeExpr);
    }
    @Transactional(readOnly = false)
    public int updatePJById(String pj,String id){
        return mobileOtherMapper.updatePJById(pj,id);
    }

    public int intoCounter(List<MobileCounter> list){

        return mobileOtherMapper.intoCounter(list);
    }
    public int intoOrgrizeTree(List<MobileOrgrizeTree> list){

        return mobileOtherMapper.intoOrgrizeTree(list);
    }
    public int intoSerial(List<MobileSerial> list){

        return mobileOtherMapper.intoSerial(list);
    }
    public int intoManager(List<MobileManager> list){

        return mobileOtherMapper.intoManager(list);
    }
    public int intoPjProject(List<MobilePjProject> list){

        return mobileOtherMapper.intoPjProject(list);
    }
    public void deletePjProject(){
        mobileOtherMapper.deletePjProject();
    }
    public void deleteCounter(){
        mobileOtherMapper.deleteCounter();
    }
    public void deleteOrgrizeTree(){
        mobileOtherMapper.deleteOrgrizeTree();
    }
    public void deleteSerial(){
        mobileOtherMapper.deleteSerial();
    }
    public void deleteManager(){
        mobileOtherMapper.deleteManager();
    }
    public List<String> findCFValue(){
        return mobileOtherMapper.findCFValue();
    }
    @Transactional(readOnly = false)
    public void delQueue(String id,int num){
        mobileOtherMapper.delQueue(id,num);
    }

    @Transactional(readOnly = false)
    public void delQueueUsers(){
        mobileOtherMapper.delQueueUsers();
    }

    @Transactional(readOnly = false)
    public void intoQueueUsers(List<QueueUser> list){
        mobileOtherMapper.intoQueueUsers(list);
    }

    public List<String> findUserIdQZK(){
        return mobileOtherMapper.findUserIdQZK();
    }

    @Transactional(readOnly = false)
    public void updateOtherUserValue(MobileOtherHQueue mh){
        mobileOtherMapper.updateOtherUserValue(mh);
    }

    public int findCountCF(String id){
        return mobileOtherMapper.findCountCF(id);
    }


}
